import geopandas as gpd
import pandas as pd
import libpysal as lps
import matplotlib.pyplot as plt
import esda
gdf = gpd.read_file('C:/Users/18295335197/Desktop/test/武汉市街区每日.geojson')
w = lps.weights.Queen.from_dataframe(gdf)
moran=list()
p=list()
columns_list=list(gdf)[2:174]
for i in range (2,174):
    y = gdf.iloc[:,i]
    mi = esda.moran.Moran(y, w)
    print('Moran‘s I ', mi.I)
    moran.append( mi.I )
    print('p ', mi.p_sim)
    p.append( mi.p_sim )
print(moran)
print(p)